<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./lib/vue.js"></script>
  </head>
  <body>
    <div id="app">
      <!-- 视图 View -->
      <!-- <p>{{ msg }}</p> -->
      <p v-text="msg"></p>
      <p v-text="isMan ? '男' : '女'"></p>
      <p v-text="number + 3"></p>
      <!-- v-text只是单纯的渲染出来，不会解析里面的标签 -->
      <div v-text="message"></div>
      <div v-html="message"></div>
    </div>

    <script>
      // 创建的Vue实例就是 ViewModel
      new Vue({
        // 选项（Vue2是选项式）
        el: '#app', // element节点的简写
        data: {
          msg: 'Hello World',
          isMan: true,
          number: 100,
          message: '<div style="color: red;">Hello World2</div>'
        }
      })
    </script>
  </body>
</html>
